package cn.iocoder.yudao.module.scrm.controller.admin.product.vo;

import cn.iocoder.yudao.module.scrm.framework.operatelog.core.CrmProductStatusParseFunction;
import cn.iocoder.yudao.module.scrm.framework.operatelog.core.CrmProductUnitParseFunction;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Schema(description = "管理后台 - CRM 产品创建/修改 Request VO")
@Data
public class CrmProductSaveReqVO {

    @Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2079")
    private Long id;

    @Schema(description = "产品名称", example = "张三")
    private String name;

    @Schema(description = "产品编码")
    private Integer no;

    @Schema(description = "价格，单位：元", example = "3156")
    @DecimalMin(value = "0.00", message = "金额必须为大于或者等于0.00")
    @Digits(integer = 12, fraction = 2, message = "金额只能有12个整数和两位小数")
    @NotNull(message = "产品金额")
    private BigDecimal price;

    @Schema(description = "状态", example = "2")
    private Integer status;

    @Schema(description = "产品描述", example = "你说的对")
    private String description;

    @Schema(description = "负责人的用户编号", example = "17221")
    private Long ownerUserId;

}
